<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>fds微信二维码页面</title>
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
    <script type="text/javascript" th:src="@{/js/qrcode.min.js}"></script>
</head>
<body>
<div class="qr-box">
    <div class="clearfix">
        <div class="text-center pull-left" style="width: 40%; border-right: 1px dashed #d1d1d1;">
            <div id="qrcode" style="width:210px; height:210px; margin: auto;"></div>
            <p style="font-size: 14px; color: #999999; margin-top: 25px;">请使用微信扫一扫完成支付</p>
        </div>
        <div class="pull-right" style="width: 60%;">
            <div class="" style="margin-left: 118px;">
                <p style="font-size: 14px; color: #333333; margin-bottom: 25px;">斗罗大陆</p>
                <h3 style="font-size: 59px; color:#39393a; margin: 30px 0;"><sup style="font-size: 32px;"> ￥</sup>0.01</h3>
                <div class="clearfix" style="line-height: 32px;"><span class="pull-left" style="font-size: 14px; color: #999999; width: 110px;">收款方</span>xxx</div>
                <div class="clearfix" style="line-height: 32px;"><span class="pull-left" style="font-size: 14px; color: #999999; width: 110px;">下单时间</span>xxxxxx</div>
                <div class="clearfix" style="line-height: 32px;"><span class="pull-left" style="font-size: 14px; color: #999999; width: 110px;">订单号</span>xxxxx</div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" th:inline="javascript">
    var qrcode = new QRCode(document.getElementById("qrcode"), {
        width: 210,
        height: 210
    });
    var codeUrl = [[${codeUrl}]];
    console.info(codeUrl);
    qrcode.makeCode(codeUrl);
    // todo 定时器自动调用 查询订单是否支付完成
    /*var timer = setInterval(function () {
        $.get("${pageContext.request.contextPath}" + "/reportOrder/wxPayPoll.action?orderId=" + orderId, {}, function (data) {
            if (data.code == '1') {
                // 订单支付成功
                clearInterval(timer);
                window.location.href = "${pageContext.request.contextPath}" + "/index.action?type=pay";
            }
        }, "json");
    }, 2000)*/

</script>
</body>
</html>